package com.homejoy.common.enums;

public enum UserCategory {
    TENANT("0", new Long[]{100L}),
    LANDLORD("1", new Long[]{101L});
    private final String code;
    private final Long[] roleIds;
    UserCategory(String code, Long[] roleIds) {
        this.code = code;
        this.roleIds = roleIds;
    }
    public static UserCategory getByCode(String code) {
        for (UserCategory category : values()) {
            if (category.code.equals(code)) {
                return category;
            }
        }
        return LANDLORD; // 默认值
    }
    public Long[] getRoleIds() {
        return roleIds;
    }
}
